#include<iostream>
#include<string>
using namespace std;
template<class T>
class myclass{
	T *p;
	int nSize;
public:
	myclass(T *a, int n){
		p = new T[n];
		for (int i = 0; i< n; ++i){
			p[i] = a[i];
		}
		nSize = n;
	}
	~myclass(){
		delete[]p;
	}
	void Show(){
		for (int i = 0; i<nSize; ++i){
			cout << p[i];
		}
	}
};
int main(){
	char * szName = "TomHanks";
	//int *a = new int[10];
	myclass<char> obj(szName, strlen(szName));
	//int len1 = sizeof(szName);
	//int len2 = strlen(szName);
	//int len3 = strlen(a);
	obj.Show();

	system("pause");
	return 0;
}
